home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / Storage / Bento / DrafPriv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  1.6 KB  |  89 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DrafPriv.h
  3.  
  4.     Contains:    Private class used by CMDraft.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <8>     6/16/95    VL        1244940: Removed fEV from PreserveFocus
  13.                                     class.
  14.          <7>     6/13/95    VL        1241352: Moved PreserveFocus from
  15.                                     CMDraft.cpp.
  16.          <6>     4/25/95    DM        1172791: Replace AEHashTable with
  17.                                     OpenHashTable
  18.          <5>     8/11/94    CC        Added #define _DRAFPRIV_.
  19.          <4>     6/20/94    CC        ODMemoryHeap* changed to ODMemoryHeapID.
  20.          <3>     6/15/94    RR        ODHeap -> ODMemoryHeap
  21.          <2>     5/27/94    VL        Changed ODAEHashTable to AEHashTable.
  22.          <1>     5/27/94    VL        first checked in
  23.  
  24.     To Do:
  25. */
  26.  
  27. #ifndef _DRAFPRIV_
  28. #define _DRAFPRIV_
  29.  
  30. #ifndef _ODTYPES_
  31. #include "ODTypes.h"
  32. #endif
  33.  
  34. #ifndef _PLFMDEF_
  35. #include "PlfmDef.h"
  36. #endif
  37.  
  38. #ifndef _ODMEMORY_
  39. #include "ODMemory.h"
  40. #endif
  41.  
  42. class OpenHashTable;
  43. class ODStorageUnit;
  44. class ODStorageUnitCursor;
  45.  
  46. class IDList {
  47.  
  48. public:
  49.  
  50.     IDList();
  51.     ODVMethod    ~IDList();
  52.     
  53.     ODMethod void Initialize();
  54.     
  55.     ODMethod void    Add(ODID id, void* object);
  56.     ODMethod ODID Add(void* object);
  57.     ODMethod void     Remove(ODID id);
  58.  
  59.     ODMethod void*    Get(ODID id);
  60.     ODMethod ODID    GetID(void* object);
  61.     
  62.     ODMethod ODBoolean    Exists(ODID id);
  63.     ODMethod ODBoolean    ObjectExists(void* object);
  64.  
  65. private:
  66.  
  67.     ODMemoryHeapID            GetHeap();
  68.     
  69.     OpenHashTable*    fIDToObj;
  70.     OpenHashTable*    fObjToID;
  71.     ODID            fCurrentID;
  72.     ODMemoryHeapID            fHeap;
  73. };
  74.  
  75. class PreserveFocus
  76. {
  77.  
  78. public:
  79.  
  80.     PreserveFocus(Environment* ev, ODStorageUnit* su);
  81.     ~PreserveFocus();
  82.         
  83. private:
  84.  
  85.     ODStorageUnit* fSU;
  86.     ODStorageUnitCursor* fSUCursor;
  87. };
  88.  
  89. #endif    // _DRAFPRIV_